<!--登录页面-->
<!--一个页面一个模块,模块要以页面的形式来划分-->
<div class="container" ng-app="loginApp" ng-controller="loginController">
    <!--标题-->
    <div class="col-md-6 col-md-offset-3">
        <div class="page-header">
            <h2 class="text-center">angular by </h2>
        </div>
    </div>
    <div style="clear:both"></div>
    <!--错误提示信息:用户名密码错误的情况下显示-->
    <div id="message" class="well" ng-show="message">{{message}}</div>
    <!--登录表单-->
    <form ng-submit="postForm()">
        <div class="form-group">
            <label>用户名</label>
            <input type="text" class="form-control" name="username" placeholder="用户名" ng-model="formData.username">
            <!--当用户名为空的时候提示用户输入用户名-->
            <span class="help-block" ng-show="errorUsername">{{errorUsername}}</span>
        </div>
        <div class="form-group">
            <label>密码</label>
            <input type="password" class="form-control" name="password" placeholder="密码" ng-model="formData.password">
            <!--当密码为空的时候提示用户输入密码-->
            <span class="help-block" ng-show="errorPassword">{{errorPassword}}</span>
        </div>
        <button type="submit" class="btn btn-success btn-block btn-lg"><span class="glyphicon glyphicon-flash"></span>提交</button>
    </form>
</div>